﻿# CMakeList.txt: 顶层 CMake 项目文件，在此处执行全局配置
# 并包含子项目。
#
cmake_minimum_required (VERSION 3.8)

project("testzlib")
SET(EXE_NAME "testzlib")
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${PROJECT_BIN_PATH})

find_package(ZLIB REQUIRED)
if(${ZLIB_FOUND})
    message("Using zlib library v${ZLIB}")
	message("zlib include dir:${ZLIB_INCLUDE_DIRS}")
endif(${ZLIB_FOUND})

include_directories(
    "${CMAKE_CURRENT_SOURCE_DIR}/tools"
    "./src"
    "${ZLIB_INCLUDE_DIRS}"
)


source_group("tools" FILES ${TOOLS_INC_LIST})
source_group("main" FILES main.cpp)


set(THIRD_INCLUDE_DIRS
)


set(THIRD_LIBRARY_DIRS 
)
#message("third lib dir:${THIRD_LIBRARY_DIRS}")

set(THIRD_LINK_LIBRARY
${ZLIB_LIBRARIES}
)

#message("third link lib:${THIRD_LINK_LIBRARY}")


build_project(
	NAME 
		${EXE_NAME} 
	SRCS
		"main.cpp"
		${TOOLS_INC_LIST}
	INC_DIR
		${THIRD_INCLUDE_DIRS}
	LIB_DIR
		${THIRD_LIBRARY_DIRS}
	LINK_LIB
		${THIRD_LINK_LIBRARY}
		GTest::gtest GTest::gtest_main GTest::gmock GTest::gmock_main
)

#add_executable(${EXE_NAME} main.cpp ${TOOLS_INC_LIST} ${TZLIB_SRC_FILES})

#target_compile_options(${EXE_NAME} PRIVATE /source-charset:utf-8 /execution-charset:utf-8)

#target_include_directories(${EXE_NAME} PRIVATE ${THIRD_INCLUDE_DIRS})

#target_link_directories(${EXE_NAME} PRIVATE ${THIRD_LIBRARY_DIRS})

#target_link_libraries(${EXE_NAME} PRIVATE
#    DbgHelp
#    as_tools
#    ${THIRD_LINK_LIBRARY}
#)

